<?php
include('config.php');
//$sql = "select * from type";
$where = 1;
$keyword = isset($_POST['keyword']) ? trim($_POST['keyword']) : '';
if($keyword){
	$where .= " and type_name like '%{$keyword}%'";
}
$result = $mysql->selectList('type',$where);
if($result){
	foreach ($result as $k=>$v){
		echo '<label style="display:block;" ondblclick="dblTypes('.$v['type_id'].')" id="change_types'.$v['type_id'].'" onclick="select_type_change_backgroud('.$v['type_id'].')"><input type="radio"  name="radiobutton" value="'.$v['type_name'].'" />'.$v['type_name'].'</label>';
	}
}